import { BaiduHot, BiliHot, FengHuangHot, WeiboHot } from "../type/entity";
import { http } from "../util/http";

export function getWeiboHotByWord(hotWord:string){
  return http.post<WeiboHot[]>('/getHot/byWord', {hotWord, hotName:"weibo"})
}

export function getWeiboHotByTime(firstTimeStick:number, lastTimeStick: number){
  return http.post<WeiboHot[]>('/getHot/byTime', {firstTimeStick, lastTimeStick, hotName:"weibo"})
}


export function getBaiduHotByWord(hotWord:string){
  return http.post<BaiduHot[]>('/getHot/byWord', {hotWord, hotName:"baidu"})
}

export function getBaiduHotByTime(firstTimeStick:number, lastTimeStick: number){
  return http.post<BaiduHot[]>('/getHot/byTime', {firstTimeStick, lastTimeStick, hotName:"baidu"})
}
export function getFengHuangHotByWord(hotWord:string){
  return http.post<FengHuangHot[]>('/getHot/byWord', {hotWord, hotName:"fenghuang"})
}

export function getFengHuangHotByTime(firstTimeStick:number, lastTimeStick: number){
  return http.post<FengHuangHot[]>('/getHot/byTime', {firstTimeStick, lastTimeStick, hotName:"fenghuang"})
}

export function getBiliHotByWord(hotWord:string){
  return http.post<BiliHot[]>('/getHot/byWord', {hotWord, hotName:"bili"})
}

export function getBiliHotByTime(firstTimeStick:number, lastTimeStick: number){
  return http.post<BiliHot[]>('/getHot/byTime', {firstTimeStick, lastTimeStick, hotName:"bili"})
}
